package com.ktjiaoyu.crm.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ktjiaoyu.crm.mapper.RightMapper;
import com.ktjiaoyu.crm.pojo.Right;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Set;

@Service("rightService")
public class RightServiceImpl extends ServiceImpl<RightMapper, Right> implements RightService {

    @Autowired
    private RightMapper rightMapper;


    /**
     * 根据角色ID查询该角色下的权限列表
     * @param roleId
     * @return
     */
    @Override
    public Set<String> findRightsByRoleName(Long roleId) {

        return rightMapper.findRightsByRoleName(roleId);
    }
}
